{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import cv2\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.image.AxesImage at 0x7fc88a954278>"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQEAAAD7CAYAAABqkiE2AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAN3ElEQVR4nO3df+xd9V3H8efLdoXBJG2ZkK5FKUkzxUWFNAtsiyGwOWAEMGFJF5JVxTSaqWyYjCJ/GP9Elw2XTGYDbNUgP2QoDYki6TDzHyrfDsev0rUMhe/oKISNmZkYcG//uKdy+e5iy/fcc7/f8Hk+kpt7zueee8+7n9776uf86DmpKiS166eWugBJS8sQkBpnCEiNMwSkxhkCUuMMAalxg4VAkguT7E9yMMn2odYjqZ8McZ5AkhXAt4GPAPPAw8AnqurJqa9MUi8rB/rc9wMHq+o7AEnuAC4DJoZAEs9Ykob3UlX9zMLGoTYH1gPPjc3Pd23/J8m2JHNJ5gaqQdIb/cekxqFGApnQ9oZ/7atqB7ADHAlIS2mokcA8cNrY/Abg+YHWJamHoULgYWBTko1JVgFbgF0DrUtSD4NsDlTVa0l+D7gfWAHcWlVPDLEuSf0McojwLRfhPgFpFvZW1eaFjZ4xKDXOEJAaZwhIjTMEpMYZAlLjDAGpcYaA1DhDQGqcISA1zhCQGmcISI0zBKTGGQJS4wwBqXGGgNQ4Q0BqnCEgNc4QkBpnCEiNMwSkxhkCUuMMAalxhoDUOENAapwh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YXZfyGeCdY/3wG7PqD+BXgbOBx8faJvYBcDGja2wGOAfYM3Advwas7KZvGKvjzO63cxywsftNrTim9Qz9pTqGP+i5wP1j89cB1y1RLfcCHwH2A+u6tnXA/hmsewOwGzgfuK/7Ur009hf+hn4aqIaTuh9fFrTPtD94/YK1axmd1Xof8NFZ9gdw+oIf38Q+AP4S+MSk5YaoY8Frvw7c1k2/4XcD3A+ceyzrWA6bA8d8heIhJTkdOAvYA5xaVYcAuudTZlDCjcBngR938ycDP6jXL+0+i345A3gR+Eq3WXJzkhOZcX9U1XeBzwHPAoeAV4C9zL4/xr1ZHyzl93dRV/peaDmEwDFfoXiwApJ3AV8DPl1VP5zlurv1XwIcrqq9480TFh26X1YyGn7eVFVnMfr/HDPbR3NEt719GaNh7XuAE4GLJiy6HI5vL8n3t8+VvhdaDiGwpFcoTvIORgFwW1Xd0zW/kGRd9/o64PDAZXwQuDTJvwN3MNokuBFYneTIf/KaRb/MA/NVtaebv5tRKMy6Pz4MPFNVL1bVq8A9wAeYfX+Me7M+mPn3d+xK31dWN/bvU8dyCIGHgU3dnt9VjG5jtmsWK87oKqm3APuq6vNjL+0CtnbTWxntKxhMVV1XVRuq6nRGf/6vV9WVwIPAFTOs43vAc0ne2zVdwOiisTPtD0abAeckOaH7OzpSx0z7Y4E364NdwCe7owTnAK8c2WwYwiBX+h5yB89b2PlxMaM9808D189wvR9iNGR6FPi37nExo+3x3cCB7nntDGs6j9ePDpzR/UUeBP4WOG4G6/8VYK7rk78H1ixFfwB/AjwFPA78NaO93jPpD+B2RvsiXmX0L+xVb9YHjIbhX+q+u48Bmweu4yCjbf8j39cvjy1/fVfHfuCiY12Ppw1LjVsOmwOSlpAhIDXOEJAaZwhIjTMEpMYZAlLjDAGpcf8LcbOMCd3Ta/gAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "img = np.zeros((127,127,3), np.uint8)\n",
    "\n",
    "plt.imshow(img)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "img = np.zeros((512,512,3), np.uint8)   \n",
    "#fill the image with white\n",
    "img.fill(255)\n",
    "###########################################\n",
    "####Main Function                      #### \n",
    "#draw \n",
    "#        start x  y end x    y      color\n",
    "cv2.line(img, (10,50), (511, 511), (255,0,0), 5) \n",
    "cv2.rectangle(img, (384,0), (510, 128), (0, 255, 0), 3)\n",
    "cv2.circle(img, (447, 63), 63, (0,0,255), -1) \n",
    "cv2.ellipse(img, (256,256), (100,50),45,0,290,(0,0,255),-1)\n",
    "font = cv2.FONT_HERSHEY_SIMPLEX  \n",
    "cv2.putText(img, 'Hello', (10,500), font, 4, (255,2,255), 2)  \n",
    "cv2.imshow('image', img)  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
